home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7889 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: student.uq.edu.au!s224539
  2. From: s224539@student.uq.edu.au (Sahid)
  3. Newsgroups: comp.lang.c
  4. Subject: HELP : handling segmentation fault
  5. Date: 29 Feb 1996 15:35:08 GMT
  6. Organization: University of Queensland
  7. Message-ID: <4h4h3c$c5o@dingo.cc.uq.oz.au>
  8. NNTP-Posting-Host: student2.cc.uq.oz.au
  9. X-Newsreader: TIN [version 1.2 PL1]
  10.  
  11. Does anyone can explain me how to handle the following error message ?
  12. Sometime the program run normally, however one time it reported the error.
  13.  
  14. Program received signal SIGSEGV, Segmentation fault.
  15. 0x8004ce5 in check_control_in_t__FP10partitionsP8meetingsi (timetable=0x839a000,
  16.    scs=0x8029000, t=2) at tsp.c:373
  17. 373             scs1=timetable[t].index_scs_list[i];
  18. (gdb) list
  19.  
  20. 367 conflict check_control_in_t(partitions huge timetable[], meetings huge 
  21.     scs[],int t){
  22. 368    unsigned int i,j,scs1,scs2;
  23. 369    conflict result={0,0,0},scs12;
  24. 370
  25. 371    // calculate student and lecturer conflicts ...
  26. 372    for(i=0;i<timetable[t].no_scs-1;i++){      
  27. 373        scs1=timetable[t].index_scs_list[i];
  28. 374        for(j=i+1;j<timetable[t].no_scs;j++){             
  29. 375            scs2=timetable[t].index_scs_list[j];
  30. 376             scs12=find2scs_conflict(scs, scs1, scs2);
  31. 377             if(scs12.students+scs12.lecturers>0){                    
  32. 378                result.students +=scs12.students;
  33. 379                result.lecturers +=scs12.lecturers;
  34. 380            }             
  35. 381         }      
  36. 382    }     
  37. 383    return result;
  38. 384 }
  39.  
  40. Thanks in advance for any suggestion.
  41.  
  42. @&_____________________________________________________________________         
  43. S y a h i d  = sah@maths.uq.oz.au   .   Jurdik Matematika       .  *  .
  44. Departement of Mathematics       _-_|\  FPMIPA IKIP Yogyakarta  (\~|~/) 
  45. University of Queensland        /     * Indonesia  55281        *~-V-~*
  46. Brisbane, Australia 4072 _______\_.-._/ Ph (0274)586286 Psw(333) -IKIP-
  47. Ph/Fax (07)3652686/870 2272 *********v  ===============================
  48. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~e-mail (alt) : s224539@student.uq.edu.au **
  49.  
  50.  
  51.